CarModels Class Reference

#include <CarModels.h>

List of all members.

Static Public Member Functions

static void initialize ()
static osg::ref_ptr< osg::Node > returnModel (int)

Static Private Attributes

static int models [5]
static vector< osg::ref_ptr<
osg::Node > > 
node


Detailed Description

This class encapsulates the car models

Definition at line 5 of file CarModels.h.


Member Function Documentation

void CarModels::initialize (   )  [static]
 

This function read the model files once and places them in the models array to be used by returnModel later. By this way a model file is only read once and all the Vehicle objects that have the same type will use the same Group with different PATs as their parents.

Definition at line 5 of file CarModels.cpp.

References models, and node.

Referenced by RightView::SetSceneData().

osg::ref_ptr< osg::Node > CarModels::returnModel (  int   )  [static]
 

returns the models Node according to the only argument

Definition at line 12 of file CarModels.cpp.

References models, and node.

Referenced by TraffEduObject::returnNode().


Member Data Documentation

int CarModels::models [static, private]
 

array that holds flags for each model file, if a model file is created the appropriate place in the array becomes one which is inially 0 for all models.

Definition at line 25 of file CarModels.h.

Referenced by initialize(), and returnModel().

vector< osg::ref_ptr< osg::Node > > CarModels::node [static, private]
 

vector that holds the read models nodes whenever a new vehicle is inserted, if it is not already inserted to this vector it is done by reading the model file so later uses of the same model will simply use the same node in the vector

Definition at line 32 of file CarModels.h.

Referenced by initialize(), and returnModel().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO